feat(UI): add blob page#1075
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new “blob” page for displaying file contents and migrates several code-view components from the archived /archived/moon folder.
- Introduces
BlobPageunderpages/[org]/code/blob/[...path].tsxwith layout and data-fetching viauseGetBlob - Migrates and wires up code-view/editor components (
CodeContent,Editor,ExampleTheme,CodeTable) - Updates dependencies (
@lexical/*,prism-react-renderer) and adds a LICENSE for Bootstrap Icons
Reviewed Changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| moon/apps/web/public/icons/LICENSE.md | Added Bootstrap Icons license |
| moon/apps/web/pages/[org]/code/blob/[...path].tsx | New BlobPage component with layout and blob-fetching hook |
| moon/apps/web/package.json | Added Lexical and Prism dependencies |
| moon/apps/web/hooks/useGetBlob.ts | New useGetBlob hook using React Query |
| moon/apps/web/components/CodeView/CodeTable.tsx | Updated file-navigation logic to construct blob URLs |
| moon/apps/web/components/CodeView/BlobView/ExampleTheme.js | Added theme mapping for Lexical editor |
| moon/apps/web/components/CodeView/BlobView/Editor.tsx | Introduced Lexical-based inline editor plugin |
| moon/apps/web/components/CodeView/BlobView/CodeContent.tsx | Migrated code rendering with Prism and inline comment editor |
| moon/apps/web/components/CodeView/BlobView/CodeContent.module.css | Added CSS for code view, including unused .fileCodeContainer |
| archived/moon/.env.local | Updated MEGA_HOST and MEGA_INTERNAL_HOST |
Files not reviewed (1)
- moon/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
moon/apps/web/pages/[org]/code/blob/[...path].tsx:12
- Use camelCase for variable names in JS/TS; rename
new_pathtonewPathto match project conventions.
const new_path = '/' + path.join('/')
moon/apps/web/components/CodeView/BlobView/CodeContent.tsx:12
- The prop type annotation is incorrect. You should destructure an object of shape
{ fileContent: string }, e.g.({ fileContent }: { fileContent: string }).
const CodeContent = ({ fileContent }: string) => {
benjamin-747
approved these changes
May 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1071
Temporarily migrate components from the /archieved/moon. The next step is to investigate new component replacement solutions.